Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Lotus Expeditor wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL forums and blogs
  • Home
  • Product Documentation
  • Community Articles
Search
Community Articles > Expeditor Integrator > Resource Monitor and Resource Adapter Configuration
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

What's New in Lotus Expeditor Client for Desktop and Toolkit 6.2.3

This article provides an overview of the new and noteworthy features and capabilities in the Expeditor 6.2.3 Desktop Client and Toolkit

What's New for Lotus Expeditor Client for Devices 6.2.2

Lotus® Expeditor Client for Devices 6.2.2 provides new function and supports new platforms over the previous release, Lotus Expeditor Client for Devices 6.2.1. New Platform Support Windows Mobile 6.5 devices Support for remote update of Expeditor core components Allows administrators to send new ...

How-To: Enable the Integrator Linux Daemon support

Starting with the 6.2.1 release, the Lotus Expeditor integrator product will support the RedHat Enterprise Linux (RHEL) Update 5 and SuSe Linux (SLED) Desktop Edition 10 platforms. Lotus Expeditor integrator can be configured to run as a standalone runtime as well as a daemon. The following ...

What's New in Lotus Expeditor Server 6.2.1

The Lotus® Expeditor Client Server 6.2.1 provides new application development functions over the previous release, Lotus Expeditor Client Server 6.2. Here are the highlights of these new application development functions: New Platform Support Windows Server 2008 New Database Support Oracle 11g ...

What's New in Lotus Expeditor Client for Devices 6.2.1

The Lotus® Expeditor Client for Devices 6.2.1 provides new application development functions over the previous release, Lotus Expeditor Client for Devices 6.2. Here are the highlights of these new application development functions: New Device Support WinCE 6.0 Pro devices Nokia S60 3.2 ...
Community articleResource Monitor and Resource Adapter Configuration
Added by ~Emile Asatoolitader | Edited by IBM contributor~Sven Zenkrotexflar on September 30, 2009 | Version 3
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: Integrator
ShowTable of Contents
HideTable of Contents
  • 1 Resource Monitor and Resource Adapter Configuration
    • 1.1 JMS Queue Destination Adapter
    • 1.2 FTP Resource Adapter
    • 1.3 SSH Resource Adapter
    • 1.4 File System Resource Adapter
    • 1.5 Regular Expression Support for Local File System FTP Adapters and SSH Adapters
    • 1.6 Database Resource Adapter
    • 1.7 Generic Resource Adapter

Resource Monitor and Resource Adapter Configuration


The Resource Monitor keeps track of different resource types through a number of registered Resource Adapters. For the retail environment example in Figure 1 of chapter ‎1.2, the 4690 PoS Controller can only be accessed through its FTP Server. Since there might be different source FTP Servers for each file which is read from a FTP source directory, FTP access must be configured for each file that is handled. This means, there is a single FTP Resource Adapter required for each file resource (or a group of resources which can be identified through regular expressions).

Expeditor integrator supports monitoring of the following resource types:
  • Files and file groups (identifiable through regular expressions) on file servers which can be accessed through FTP, SSH (SCP) and on local file systems (XPDINTEG_FTP_ADAPTER, XPDINTEG_SSH_ADAPTER, XPDINTEG_FILE_SYSTEM_ADAPTER)
  • Database records which can be monitored through SQL SELECT statements using JDBC (XPDINTEG_DB_ADAPTER)
  • Local micro broker queues (XPDINTEG_JMS_DESTINATION_ADAPTER)

In general, each Resource Adapter needs to be configured individually for each monitored resource. It takes configuration properties which define the condition under which the Resource Adapter informs the Resource Monitor about the existence of the monitored resource. Then, the Resource Monitor triggers an Event Admin event (Expeditor integrator Trigger Event) which can kick off Expeditor integrator Application Control Flows to process the identified resource or start other use case specific actions. ACS Flow Activities also use the Resource Adapter interface for accessing the identified resource (e.g. read/write a message or a file). Figure 8 shows that the JMS Destination Adapter is used by the Resource Monitor to identify new incoming messages. The published trigger event, which is also configurable under the Adapter configuration, kicks off the corresponding ACS Flow (that was configured for this trigger event, see ‎Ref_2). Then, the ACS Activities in the triggered flow can get hold of the triggering resource and process its data through the Resource Adapter’s Read/Write operations.

Figure 8: Resource Adapter configuration to ACS Flow and Activities relationship



The Resource Monitor Service configuration is realized by providing a list of these Resource Adapters (one per resource) in the XPDinteg.xml configuration under the property. For each file handling action, a separate configuration is provided that is associated with a certain Resource Adapter.
Table 14 shows the generally available configuration properties for a Resource Adapter.

Table 14: General Resource Adapter configuration

Property
Explanation
Adapter Type; accepted values are:
XPDINTEG_FTP_ADAPTER, XPDINTEG_SSH_ADAPTER, XPDINTEG_FILE_SYSTEM_ADAPTER,
XPDINTEG_DB_ADAPTER,
XPDINTEG_JMS_DESTINATION_ADAPTER
String: name of the adapter under which it is registered with the Resource Monitor
OR
Indicates method of operation.
Either the adapter is synchronously polled by the Resource Monitor () or the adapter is able to provide new data on its occurrence asynchronously ().
Polling interval in milliseconds if method= (Note: Think about a sufficient value, see chapter ý5.11.4)
Interval in milliseconds after which the adapter polling interval timer is started after Resource Adapter start. This helps to equalize the polling intervals of different adapters in order to achieve better load balancing.
Any data structure that can be exchanged with the Resource Monitor (e.g. When using a listener, the message header property values could be provided as selection criteria here. When using the poll method for files, here the name and directory string of the file resource that is monitored is provided, e.g. meta-data:BINARY-/NWW_DAT/EAMMD743.MMS)
Topic under which an event is created for the OSGi Event Admin Service in case the Resource Adapter retrieved data (Expeditor integrator Trigger Event: This event can trigger further actions, see flow definitions.)
JNDI lookup key for the name of the Connection Factory to which the monitored queue belongs to.

value =
JNDI lookup key for the name of the monitored queue

value=
JNDI lookup key for the name of the used Deadletter queue (where message is moved to in case the received message is wrong)

The following sections provide configuration details for these adapters.

JMS Queue Destination Adapter


The XPDINTEG_JMS_DESTINATION_ADAPTER is used to monitor local micro broker queues for incoming messages.

General format:
 <adapter type="XPDINTEG_JMS_DESTINATION_ADAPTER" 
   name="your_adapter_name">
   <!-- async mode -->
    <listener>
        <meta-data>jms_msg_header_property1 = 'value1' </meta-data> 
        <topic> com/ibm/integrator/flowtriggerevent/<MessagePurpose>/MESSAGE/JmsAdapter  
        </topic>
    </listener>
    <configuration>
        <param name="JndiConnectionFactoryKey" value="your_connection_factory"/>
        <param name="JndiDestinationKey" value="your_monitored_queue"/>
        <param name="JndiDeadletterKey" value="your_deadletter_queue_if_msg_not_correct"/>
        <param name="ValidateLocationId" value="ON"/>
    </configuration>
               </adapter> 


Table 15: JMS Resource Adapter configuration

Property
Explanation
=
Adapter Type (monitors a given local queue)
XPDINTEG_JMS_DESTINATION_ADAPTER
name=
String: name of the adapter under which it is registered with the Resource Monitor
Indicates asynchronous operation:
adapter is able to provide new data on its occurrence asynchronously
Any data structure that can be exchanged with the Resource Monitor (when using a listener, the message header property values could be provided as selection criteria here.). If is not provided all messages will be picked up. If
jms_msg_header_property1 = '*'
all messages with JMS Custom Header property jms_msg_header_property1 are chosen (independent of its value).
Topic under which an event is created for the OSGi Event Admin Service in case the Resource Adapter retrieved data (this event can trigger further actions, see flow definitions)
Tag which indicates detailed configuration parameter section
JNDI lookup key for the name of the Connection Factory of the monitored queue.
JNDI lookup key for the name of the monitored queue
JNDI lookup key for the name of the used Deadletter queue (where message is moved to in case the received message is wrong)
="ON" or "OFF"
Describes whether adapter should check the JMS Custom Header parameter LocationId against the configured my_location_id value in XPDinteg.xml. If these are not the same, the message header is interpreted as invalid (Avoids processing of messges which might not have been intended for this Expeditor integrator runtime.).
Note: default value is "OFF".

An example is given in Listing 15.

Listing 15: JMS_DESTINATION_ADAPTER example for messages received in jms/XPDinteg_CtrlQ with message header property MessagePurpose=ConfigUpdate and ResourceCmd=FILE
<adapter type="XPDINTEG_JMS_DESTINATION_ADAPTER" 
   name="Default_ConfigUpdateResourceCmdAdapter">
   <!-- async mode -->
    <listener>
        <meta-data>MessagePurpose = 'ConfigUpdate' AND ResourceCmd LIKE 'FILE%'</meta-data>
        <topic>com/ibm/integrator/flowtriggerevent/ConfigUpdate/MESSAGE/JmsAdapter</topic>
    </listener>
    <configuration>
        <param name="JndiConnectionFactoryKey" value="jms/XPDinteg_ConnectionFactory"/>
        <param name="JndiDestinationKey" value="jms/XPDinteg_CtrlQ"/>
        <param name="JndiDeadletterKey" value="jms/XPDinteg_ServerDeadletterQ"/>
    </configuration>
</adapter> 



FTP Resource Adapter


The XPDINTEG_FTP_ADAPTER is used to monitor a given file or list of files in a given directory on a provided FTP file server.

General format:
 <adapter type="XPDINTEG_FTP_ADAPTER" name="your_adapter_name">
   <!-- sync mode -->
   <polling>
<interval>your_polling_interval_in_msec</interval>
<startup-delay>polling_interval_timer_startup_delay</startup-delay>
	<meta-data>FileTransferMode-monitored_file_name</meta-data>
	<topic>com/ibm/integrator/flowtriggerevent/FileTransfer/FTP/FtpAdapter</topic>
    </polling>
    <configuration>
<param name="ResourceType" value="SampleFtpFile"/>
<param name=…
...
    </configuration> 
</adapter> 


Table 16 provides an explanation of the available properties.

Table 16: FTP Resource Adapter configuration properties

Property
Explanation
=
Adapter Type (for accessing a given FTP Server)
XPDINTEG_FTP_ADAPTER
name=
String: name of the adapter under which it is registered with the Resource Monitor
Indicates synchronous operation (Resource Monitor polls this Adapter for the existence of the monitored resource)
Polling interval in milliseconds if method= (Note: Think about a sufficient value, see chapter ý5.11.4)
Interval in milliseconds after which the adapter polling interval timer is started after Resource Adapter start. This helps to equalize the polling intervals of different adapters in order to achieve better load balancing.
It’s the name and directory string of the file resource that is monitored (e.g. BINARY-/NWW_DAT/EAMMD743.MMS)
FILE_TRANSFER_MODE=BINARY or ASCII
monitored_file_name=directory_name/filename
OR a Regular Expression which identifies files due to a given search criteria (see chapter ý4.4.5 for details).
Topic under which an event is created for the OSGi Event Admin Service in case the Resource Adapter retrieved the monitored file or data (this event can trigger further actions, see flow definitions)
value=
Resource Type corresponding to the Expeditor integrator settings. The Resource Type is mapped to a distinct file that needs to be transferred in the Resource Mapper configuration. This can also contain all access information for the FTP server (e.g. FTP server address, user name and password; see details about Resource Mapper configuration in chapter ý4.6). If a ResourceType and Resource Mapper configuration is given the other parameters do NOT need to be provided here.
Hostname of the remote FTP server
Port number of the FTP server port. By default this is 21, the traditional FTP server port
User name for login to the remote FTP server. This is mandatory.
Password for the login to the remote FTP server. This is mandatory.
TRUE | FALSE
Boolean indicator as to whether the FTP should be attempted in passive or active mode. Default is active, as per the FTP standard.
FTP server type: DEFAULT | 4690
DEFAULT for standard FTP server
4690 for FTP server of 4690 PoS controller
“FTP”
A description of the picked up file
“ASCII” or “BINARY”
In which mode is the picked up file resource transferred in the message’s payload (in ASCII or binary format)?
“DELETE” or “RecreateZero” or “WriteOtherFile”
Defines the action on the picked up file resource after successful transfer to the back-end queue.
NONE – leave the picked up file as it is (Note: With NONE, the file will trigger another transaction during the next polling interval!)
DELETE – delete the file resource(s) in the source directory
RecreateZero – recreate a file with length zero byte, but with the same name as the source file resource
WriteOtherFile – source file is re-named with the name
provided in WriteOtherFileName
String value with the file name in which the original transferred file should be re-named (if TransferConfirmationMode=WriteOtherFile)
“UTF-8” or “UTF-16” etc.
Type of data encoding.
value in milliseconds
If more then one file needs to be processed (e.g. for the cases where a number of resources is selected using Regular Expressions, see chapter ý4.4.5 for details), the adapter waits this interval before the next matching resource is picked up. This avoids high peaks of RAM consumption and helps to achieve better load balancing.
TRUE or FALSE
By default all file related adapters (FileSytem, FTP and SSH) ignore the files with zero length. To process the zero length files, this adapter configuration parameter is used. If this value is set to TRUE, the adapter will also handle the zero length files.
e.g. “5”
Option to provide custom transfer priority schema. Files with highest priority will be transferred to the back-end first.

The param name=”ResourceType” could be used to move FTP server access configuration values into the Expeditor integrator Resource Mapper configuration (e.g. FTP server name, port, user name). This makes the Resource Adapter configuration shorter and more readable. If configuration parameters are provided in the Resource Adapter configuration and in the Resource Mapper configuration, the Resource Adapter’s configuration is given priority over the Resource Mapper.
Please, refer to chapter ‎4.6 for the Resource Mapper configuration.

An example is provided in Listing 16.

Listing 16: XPDINTEG_FTP_ADAPTER example
 <adapter type="XPDINTEG_FTP_ADAPTER" name="SampleFtpAdapter">
   <!-- sync mode -->
   <polling>
<interval>60000</interval>
	<meta-data>BINARY-sample.txt</meta-data>
	<topic>com/ibm/integrator/flowtriggerevent/FileTransfer/FTP/FtpAdapter</topic>
    </polling>
    <configuration>
<param name="ResourceType" value="SampleFtpFile"/>
    </configuration> 
</adapter> 


Transactional roll-back behaviour: The file transferal activities are rolled back in case of errors (e.g. number of transfer retries is exceeded and only parts of a file could be written). This does include the file creation process only. Created directories will be not removed during roll-back anymore.

SSH Resource Adapter


The XPDINTEG_SSH_ADAPTER is used to monitor a given file or list of files in a given directory on a provided file server which can be accessed through the Secure Shell (SSH) of SSH servers.

The Expeditor integrator implementation is based on the two underlying protocols of the SSH server.
  • SFTP (Secure FTP on top of SSH)
  • SCP (Secure Copy)

The SFTP protocol specification gives the full control to perform various operations on SSH servers including file read and file write operation, where as SCP is meant only for secure file copy in both the directions. The other operations that are very important to this adapter are deleting files, renaming files, moving files, finding the directory existence, listing the files and so on.

The SFTP specification has direct support to perform the above operations where as the SCP does not. To perform the above operation, the SSH execution channel is used to run various commands and get the status of the operation (e.g. the result of the command).

Note: It is assumed that all Linux commands work on the accessed SSH servers. Linux commands are used to perform various operations. The format of the listed files follows the same format as the Linux ls command.

General format:
 <adapter type="XPDINTEG_SSH_ADAPTER" name="your_adapter_name">
   <!-- sync mode -->
   <polling>
<interval>your_polling_interval_in_msec</interval>
<startup-delay>polling_interval_timer_startup_delay</startup-delay>
	<meta-data>FileTransferMode-monitored_file_name</meta-data>
	<topic>com/ibm/integrator/flowtriggerevent/FileTransfer/SSH/SshAdapter</topic>
    </polling>
    <configuration>
<param name="ResourceType" value="SampleSshFile"/>
<param name=…
...
    </configuration> 
</adapter> 


Table 17 provides an explanation of the available properties.

Table 17: SSH Resource Adapter configuration properties

Property
Explanation
=
Adapter Type (for accessing a given SSH Server)
XPDINTEG_SSH_ADAPTER
name=
String: name of the adapter under which it is registered with the Resource Monitor
Indicates synchronous operation (Resource Monitor polls this Adapter for the existence of the monitored resource)
Polling interval in milliseconds if method= (Note: Think about a sufficient value, see chapter ý5.11.4)
Interval in milliseconds after which the adapter polling interval timer is started after Resource Adapter start. This helps to equalize the polling intervals of different adapters in order to achieve better load balancing.
It’s the name and directory string of the file resource that is monitored (e.g. <meta-data>BINARY-/NWW_DAT/EAMMD745.MMS)
FILE_TRANSFER_MODE=BINARY or ASCII
monitored_file_name=directory_name/filename
OR a Regular Expression which identifies files due to a given search criteria (see chapter ý4.4.5 for details).
Topic under which an event is created for the OSGi Event Admin Service in case the Resource Adapter retrieved the monitored file or data (this event can trigger further actions, see flow definitions)
value=
Resource Type corresponding to the Expeditor integrator settings. The Resource Type is mapped to a distinct file that needs to be transferred in the Resource Mapper configuration. This can also contain all access information for the SSH server (e.g. SSH server address, user name and password; see details about Resource Mapper configuration in chapter ý4.6). If a ResourceType and Resource Mapper configuration is given the other parameters do NOT need to be provided here.
Hostname of the remote SSH server.
User name for login to the remote SSH server. This is mandatory.
Password for the login to the remote SSH server. This is mandatory.
Port number of the SSH server port. By default this is 21, the traditional SSH server port
SSH server type: “SFTP” or “SCP”
“SSH”
A description of the picked up file
“ASCII” or “BINARY”
In which mode is the picked up file resource transferred in the message’s payload (in ASCII or binary format)?
“DELETE” or “RecreateZero” or “WriteOtherFile”
Defines the action on the picked up file resource after successful transfer to the back-end queue.
NONE – leave the picked up file as it is (Note: With NONE, the file will trigger another transaction during the next polling interval!)
DELETE – delete the file resource(s) in the source directory
RecreateZero – recreate a file with length zero byte, but with the same name as the source file resource
WriteOtherFile – source file is re-named with the name
provided in WriteOtherFileName
String value with the file name in which the original transferred file should be re-named (if TransferConfirmationMode=WriteOtherFile)
“UTF-8” or “UTF-16” etc.
Type of data encoding.
value in milliseconds
If more then one file needs to be processed (e.g. for the cases where a number of resources is selected using Regular Expressions, see chapter ý4.4.5 for details), the adapter waits this interval before the next matching resource is picked up. This avoids high peaks of RAM consumption and helps to achieve better load balancing.
TRUE or FALSE
By default all file related adapters (FileSytem, FTP and SSH) ignore the files with zero length. To process the zero length files, this adapter configuration parameter is used. If this value is set to TRUE, the adapter will also handle the zero length files.
e.g. “5”
Option to provide custom transfer priority schema. Files with highest priority will be transferred to the back-end first.

The param name=”ResourceType” could be used to move SSH server access configuration values into the Expeditor integrator Resource Mapper configuration (e.g. SSH server name, port, user name). This makes the Resource Adapter configuration shorter and more readable. If configuration parameters are provided in the Resource Adapter configuration and in the Resource Mapper configuration, the Resource Adapter’s configuration is given priority over the Resource Mapper.
Please, refer to chapter ‎4.6 for the Resource Mapper configuration.

An example for the configuration of the SSH Resource Adapter is given in Listing 17.

Listing 17: XPDINTEG_SSH_ADAPTER example
 <adapter type="XPDINTEG_SSH_ADAPTER" name="SampleSshAdapter">
   <!-- sync mode -->
   <polling>
<interval>60000</interval>
	<meta-data>BINARY-sample.txt</meta-data>
	<topic>com/ibm/integrator/flowtriggerevent/FileTransfer/SSH/SshAdapter</topic>
    </polling>
    <configuration>
<param name="ResourceType" value="SampleSshFile"/>
    </configuration> 
</adapter> 


Transactional roll-back behaviour: The file transferal activities are rolled back in case of errors (e.g. number of transfer retries is exceeded and only parts of a file could be written). This does include the file creation process only. Created directories will be not removed during roll-back anymore.

File System Resource Adapter


The XPDINTEG_FILE_SYSTEM_ADAPTER is used to monitor a given file or list of files in a given directory of the local file system.

General Format:
 <resource-monitor-service>
  <adapters>
    <adapter type="XPDINTEG_FILE_SYSTEM_ADAPTER" name="SampleFileSystemAdapter">
      <!-- sync mode -->
      <polling>
<interval>your_polling_interval_in_msec</interval>
<startup-delay>polling_interval_timer_startup_delay</startup-delay>
<meta-data>FileTransferMode-monitored_file_name </meta-data>
<topic>com/ibm/integrator/flowtriggerevent/FileTransfer/LocalFileSystem/LocalFileSystemAdapter</topic>
      </polling>
      <configuration>
<param name="ResourceType" value="SampleFileSystemFile"/>
<param name=…
…
      </configuration>
    </adapter> 


Table 18 provides an explanation of the available properties.

Table 18: Local file system Resource Adapter configuration properties

Property
Explanation
=
Adapter Type (for accessing the local file system)
XPDINTEG_FILE_SYSTEM_ADAPTER
name=
String: name of the adapter under which it is registered with the Resource Monitor
Indicates synchronous operation (Resource Monitor polls this Adapter for the existence of the monitored resource)
Polling interval in milliseconds if method= (Note: Think about a sufficient value, see chapter ý5.11.4)
Interval in milliseconds after which the adapter polling interval timer is started after Resource Adapter start. This helps to equalize the polling intervals of different adapters in order to achieve better load balancing.
It’s the name and directory string of the file resource that is monitored (e.g. BINARY-/NWW_DAT/EAMMD745.MMS)
FILE_TRANSFER_MODE=BINARY or ASCII
monitored_file_name=directory_name/filename
OR a Regular Expression which identifies files due to a given search criteria (see chapter ý4.4.5 for details).
Topic under which an event is created for the OSGi Event Admin Service in case the Resource Adapter retrieved the monitored file or data (this event can trigger further actions, see flow definitions).
value=
Resource Type corresponding to the Expeditor integrator settings. The Resource Type is mapped to a distinct file that needs to be transferred in the Resource Mapper configuration. This can also contain all file transfer related information (e.g. TransferMode, TransferConfirmationMode; see details about Resource Mapper configuration in chapter ý4.6). If a ResourceType and Resource Mapper configuration is given the other parameters do NOT need to be provided here.
“LocaFileSystem”
A description of the picked up file
“ASCII” or “BINARY”
In which mode is the picked up file resource transferred in the message’s payload (in ASCII or binary format)?
“DELETE” or “RecreateZero” or “WriteOtherFile”
Defines the action on the picked up file resource after successful transfer to the back-end queue.
NONE – leave the picked up file as it is (Note: With NONE, the file will trigger another transaction during the next polling interval!)
DELETE – delete the file resource(s) in the source directory
RecreateZero – recreate a file with length zero byte, but with the same name as the source file resource
WriteOtherFile – source file is re-named with the name
provided in WriteOtherFileName
String value with the file name in which the original transferred file should be re-named (if TransferConfirmationMode=WriteOtherFile)
“UTF-8” or “UTF-16” etc.
Type of data encoding.
value in milliseconds
If more then one file needs to be processed (e.g. for the cases where a number of resources is selected using Regular Expressions, see chapter ý4.4.5 for details), the adapter waits this interval before the next matching resource is picked up. This avoids high peaks of RAM consumption and helps to achieve better load balancing.
TRUE or FALSE
By default all file related adapters (FileSytem, FTP and SSH) ignore the files with zero length. To process the zero length files, this adapter configuration parameter is used. If this value is set to TRUE, the adapter will also handle the zero length files.
e.g. “5”
Option to provide custom transfer priority schema. Files with highest priority will be transferred to the back-end first.

The param name=”ResourceType” could be used to move the configuration values into the Expeditor integrator Resource Mapper configuration (for example, TransferMode, TransferConfirmationMode). This makes the Resource Adapter configuration shorter and more readable. If configuration parameters are provided in the Resource Adapter configuration and in the Resource Mapper configuration, the Resource Adapter’s configuration is given priority over the Resource Mapper.

Please, refer to Expeditor integrator Resource Mapper Configuration for the Resource Mapper configuration.

Listing 18 shows an example for the XPDINTEG_FILE_SYSTEM_ADAPTER configuration

Listing 18: Example for a local file system adapter which polls the datatrans/outbound directory for the XPDinteg_sample.txt ASCII file every minute and fires the event with the com/ibm/integrator/flowtriggerevent/FileTransfer/LocalFileSystem/LocalFileSystemAdapter topic when the file appears.)
 <resource-monitor-service>
  <adapters>
    <adapter type="XPDINTEG_FILE_SYSTEM_ADAPTER" name="SampleLocalFileSystemAdapter">
      <!-- async mode -->
      <polling>
<interval>60000</interval>
<meta-data>ASCII-datatrans/outbound/XPDinteg_sample.txt</meta-data>
<topic>com/ibm/integrator/flowtriggerevent/FileTransfer/LocalFileSystem/LocalFileSystemAdapter</topic>
      </polling>
      <configuration>
<param name="ResourceType" value="SampleFileSystemFile2"/>
      </configuration>
    </adapter>
     ... 



Transactional roll-back behaviour: The file transferal activities are rolled back in case of errors (e.g. number of transfer retries is exceeded and only parts of a file could be written). This does include the file creation process only. Created directories will be not removed during roll-back anymore.

Regular Expression Support for Local File System FTP Adapters and SSH Adapters


Local File System, FTP and SSH adapters use the property to poll for their respective resources. The property is used as following:
  • for polling
    • A single file or a list of files to search for within the given directory.
    • Format:
      :-[REGEX-]/ – either ASCII or BINARY; mandatory parameter.
      [REGEX-] – Keyword used to indicate that the adapter polls for multiple resources using the regular expression.
      - The directory name separated by ‘/’s
      - A single file name or a regular expression supported by the java.util.regex API. If it’s a regular expression, [REGEX-] keyword should be used and the adapter specific property ‘SortOrder’ should be specified.
      More information on writing regular expressions can be found here: http://java.sun.com/docs/books/tutorial/essential/regex/index.html.
    • Examples:
      BINARY-C:/NWW_DAT/EAMMDGUT.DAT ASCII-C:/NWW_DAT/EAMMDGUT.DAT BINARY-REGEX-C:/NWW_DAT/([A-Z])*\.DAT ASCII-REGEX-C:/NWW_DAT/EAMMDGUT\.*
  • adapter-specific properties
    • SortOrder – can be either NAME, SIZE, TYPE or DATETIME. If nothing is specified, the default SortOrder is NAME. This parameter determines the order in which the files are sent (as messages) to the backend queue. This parameter is an Resource Adapter specific property for Local File System/FTP/SSH adapters and only valid when a regular expression is used for the file name in .
    • SortDirection – can be either ASCENDING or DESCENDING. This parameter is only valid if the adapter polls for multiple resources using Regular Expressions. If nothing is specified, the default SortDirection is ASCENDING.

The following table shows the correlation between SortOrder and SortDirection.

Table 19: Regular expressions in File related Resource Adapters

SortOrder
SortDirection: ASCENDING
SortDirection: DESCENDING
NAME
General convention of sort: E.g., abc.txt appears before def.txt
General convention of sort: E.g., def.txt appears before abc.txt
SIZE
Smaller files first
Larger files first
TYPE
General convention of sort: E.g., f.abc appears before f.def
General convention of sort: E.g., f.def appears before f.abc
DATETIME
Older file first
Newer file first


Notes:
  1. The java.util.regex package defines the following characters as Metacharacters: ([{\^-$|]})?*+. Care must be taken by the user to escape these characters in the XPDinteg.xml file. As the XPDinteg.xml adheres to java.util.Properties and as ‘\’ is an escape character for java.util.Properties, the Metacharacters need to be escaped using “\” (single ‘\’).
  2. For avoiding complexity in representing regular expressions in XPDinteg.xml, ‘,’, ‘;’ and ‘\’ are never used as String literals in the regular expression for the file name, for example, filenames having these characters cannot be polled.
  3. When the SortOrder is “TYPE”, files without extension are picked up either first (if SortDirection is ASCENDING) or last (if SortDirection is DESCENDING).
  4. If the file Resource Adapter process does not have appropriate access rights, the file operation will fail and the Application Control Flow is rolled back (Action is defined in parameter RollbackMessageAction in ACS configuration section).

Database Resource Adapter


The Expeditor integrator Database Resource Adapter allows for accessing databases through JDBC. IBM Lotus Expeditor integrator is shipped with a Derby database. This can be also used for use cases that require a database as data storage (rather then flat files). In addition, other JDBC-capable databases can also be accessed through the Database Resource Adapter.

Please, contact your IBM Sales Representative for a list of currently supported databases.

The Expeditor integrator Database Resource Adapter can access databases for reading records (select operation) as well as writing data records (insert, update, and delete operations). The Database Resource Adapter can also be used by the Resource Monitor for reporting the existence of given result set(s). For this, the adapter can be configured with complete SQL statements or with Expeditor integrator specific configuration values.

The parameter takes the search term (select statement) which specifies the result set for which the Database Adapter is polling. This can be either a simple where clause or a full SQL SELECT statement (see Table 20).

General Format:
 <resource-monitor-service>
  <adapters>
     <adapter type="XPDINTEG_JDBC_ADAPTER" name="SampleAdapterForDatabase">
         <!-- sync mode -->
         <polling>
	<interval>your_polling_interval_in_msec</interval>
<startup-delay>polling_interval_timer_startup_delay</startup-delay>
	<meta-data>your_table_name:your_where_clause OR
      SQL-your_sql_select_statement</meta-data>
	<topic>com/ibm/integrator/flowtriggerevent/DBRecordSelect/DB/JDBCAdapter</topic>
          </polling>
          <configuration>
	<param name="DBURI" value="jdbc:derby:persistent/PersistentStore"/>
	<param name="DRIVER_CLASS" value="org.apache.derby.jdbc.EmbeddedDriver"/>
	<param name="USER" value="xpdinteg"/>
	<param name="PASSWORD" value="xpdinteg"/> 


Table 20 provides an explanation of the available properties.

Table 20: Database Resource Adapter configuration properties

Property
Explanation
=
Adapter Type (for accessing JDBC databases)
XPDINTEG_DATABASE_ADAPTER
name=
String: name of the adapter under which it is registered with the Resource Monitor
Indicates synchronous operation (Resource Monitor polls this Adapter for the existence of the monitored resource)
Polling interval in milliseconds if method= (Note: Think about a sufficient value, see chapter ý5.11.4)
Interval in milliseconds after which the adapter polling interval timer is started after Resource Adapter start. This helps to equalize the polling intervals of different adapters in order to achieve better load balancing.
Contains the SELECT statement which is used to monitor for a given result set either
a) as where clause in the format :
e.g. ORDERS:SKU=’TDL60S’

OR

b) as SQL statement in the format SQL-

e.g. SQL-SELECT * FROM ORDERS WHERE SKU=’TDL60S’

Topic under which an event is created for the OSGi Event Admin Service in case the Resource Adapter retrieved the monitored file or data (this event can trigger further actions, see flow definitions).
"your_db_access_uri" contains the valid JDBC database URI
e.g. "jdbc:derby:persistent/PersistentStore" (access to XPDinteg’s persistence store in the local Derby database)
=
"your_db_jdbc_driver_name" provides the JDBC driver class name, e.g. "org.apache.derby.jdbc.EmbeddedDriver" for the included Derby database
"your_db_user_name"
"your_db_user_passwd"

An example configuration for the JDBC Adapter is given in Listing 19.

Listing 19: JDBC Adapter example configuration (which monitors table XPDINTEGBUSINESSEVENTS of the Expeditor integrator Derby database with the name PersistenceStore for the existence of records with TRANSACTION_ID='001' and fires the given trigger event)
 <resource-monitor-service>
  <adapters>
     <adapter type="XPDINTEG_JDBC_ADAPTER" name="SampleAdapterForDatabase">
         <!-- sync mode -->
         <polling>
	<interval>60000</interval>
	<meta-data>XPDINTEGBUSINESSEVENTS:TRANSACTION_ID='001'</meta-data>
<!--
<meta-data>SQL-select * from XPDINTEGBUSINESSEVENTS WHERE TRANSACTION_ID='001</meta-data>
-->
	<topic>com/ibm/integrator/flowtriggerevent/DBRecordSelect/DB/JDBCAdapter</topic>
          </polling>
          <configuration>
	<param name="DBURI" value="jdbc:derby:persistent/PersistentStore"/>
	<param name="DRIVER_CLASS" value="org.apache.derby.jdbc.EmbeddedDriver"/>
	<param name="USER" value="xpdinteg"/>
	<param name="PASSWORD" value="xpdinteg"/>
           </configuration>
      </adapter>
... 


After the Resource Monitor has triggered an ACS Flow for interacting with the database (e.g. retrieve the reported result set and set it to the back-end system), the result set data structure is transformed into Expeditor integrators own internal XML data structure. Please, refer to the Using the IBM Expeditor integrator platform for more details about this (see ‎Ref_2).

Generic Resource Adapter


The Generic Resource Adapters does not interact with any attached resource ( is not used). In this case the polling interval can be used like a timer value.

After each polling interval, trigger event with the configured will be fired.

An example for using the Generic Resource Adapter as timer is the House Keeping Adapter which periodically kicks of the House Keeping flow (see Listing 20).

Listing 20: Configuration example for the Generic Resource Adapter
      ...
      <adapter type="XPDINTEG_GENERIC_ADAPTER" name="SampleHouseKeepingAdapter">
	<!-- sync mode -->
	<polling>
		<interval>86400000</interval>
<startup-delay>polling_interval_timer_startup_delay</startup-delay>
		<meta-data>NONE</meta-data>
		<topic>com/ibm/integrator/flowtriggerevent/HouseKeeping</topic>
	</polling>
      </adapter> 

  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (1)
collapsed Versions (1)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (3)Sep 30, 2009, 7:24:06 PM~Sven Zenkrotexflar  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software Support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL Software
  • Privacy
  • Accessibility